home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / is-unsrt.bst < prev    next >
Text File  |  1994-05-29  |  24KB  |  1,308 lines

  1. %% =====================================================================
  2. %% WARNING: Do NOT edit this file.  It was produced automatically by
  3. %% Nelson H. F. Beebe <beebe@plot79.math.utah.edu>
  4. %% from /a/csc-sun/export/home/csc-sun/b/beebe/tex/bib/merge/xbtxbst.doc 
  5. %% on Mon May 30 18:10:01 MDT 1994
  6. %% =====================================================================
  7. %%%=====================================================================
  8. %%% @BibTeX-style-file{
  9. %%%     author          = "Nelson H. F. Beebe",
  10. %%%     version         = "1.05",
  11. %%%     date            = "30 May 1994",
  12. %%%     time            = "18:05:20 MDT",
  13. %%%     filename        = "is-unsrt.bst",
  14. %%%     address         = "Center for Scientific Computing
  15. %%%                        Department of Mathematics
  16. %%%                        University of Utah
  17. %%%                        Salt Lake City, UT 84112
  18. %%%                        USA",
  19. %%%     telephone       = "+1 801 581 5254",
  20. %%%     FAX             = "+1 801 581 4148",
  21. %%%     checksum        = "59342 1307 2935 24385",
  22. %%%     email           = "beebe@math.utah.edu (Internet)",
  23. %%%     codetable       = "ISO/ASCII",
  24. %%%     keywords        = "BibTeX, style, bibliography",
  25. %%%     supported       = "yes",
  26. %%%     docstring       = "This file is a modification of the standard
  27. %%%                        BibTeX btxbst.doc file, or is a .bst file
  28. %%%                        derived from that modification.  It contains
  29. %%%                        added support for ISBN and ISSN fields, as
  30. %%%                        well as for the PERIODICAL entry.  The UNIX C
  31. %%%                        preprocessor can be used to extract the
  32. %%%                        extensions of the standard styles, as
  33. %%%                        follows:
  34. %%%
  35. %%%                        cpp -P -DPLAIN xbtxbst.doc is-plain.txt
  36. %%%                        cpp -P -DUNSRT xbtxbst.doc is-unsrt.txt
  37. %%%                        cpp -P -DALPHA xbtxbst.doc is-alpha.txt
  38. %%%                        cpp -P -DABBRV xbtxbst.doc is-abbrv.txt
  39. %%%
  40. %%%                        Add -D_ISBN for ISBN output, -D_ISSN for
  41. %%%                        ISSN output, -D_LCCN for LCCN output,
  42. %%%                        -D_PRICE for price output, and -D_BOOKPAGES
  43. %%%                        for book and techreport pages output.
  44. %%%
  45. %%%                        Add -D_NUMERIC_SUFFIXES to get numeric
  46. %%%                        label suffixes -1, -2, ..., -26, instead of
  47. %%%                        letters a, b, ..., z, so as to correctly
  48. %%%                        handle alpha-style bibliographies with more
  49. %%%                        than 26 entries for a single author in one
  50. %%%                        year.  Change letter suffix code to switch
  51. %%%                        to numeric suffixes if more than 26 letters
  52. %%%                        are used, so that no matter which scheme is
  53. %%%                        selected, correct output will always be
  54. %%%                        obtained.
  55. %%%
  56. %%%                        If desired, a sed script can be used to
  57. %%%                        eliminate non-essential comments (this
  58. %%%                        reduces the file size by 2/3); a command
  59. %%%                        filter step like
  60. %%%                                sed -e '/^%$/d' -e '/^%[^%].*$/d'
  61. %%%                        will accomplish that job.
  62. %%%
  63. %%%                        The checksum field above contains a CRC-16
  64. %%%                        checksum as the first value, followed by the
  65. %%%                        equivalent of the standard UNIX wc (word
  66. %%%                        count) utility output of lines, words, and
  67. %%%                        characters.  This is produced by Robert
  68. %%%                        Solovay's checksum utility."
  69. %%%     }
  70. %%% ====================================================================
  71. %%% Revision history (reverse time order):
  72. %%% 1.05 [30-May-1994]
  73. %%%     Add NUMERIC_SUFFIXES support.
  74. %%%
  75. %%%     Change all preprocessor statements to put else and endif
  76. %%%     labels inside C-style comments to conform to 1989 ISO/ANSI C
  77. %%%     Standard.
  78. %%% 1.04 [11-Nov-1993]
  79. %%%     Add underscore prefix to new processor symbols to prevent
  80. %%%     substitution in comments
  81. %%% 1.03 [11-Oct-1993]
  82. %%%     Add support for LCCN (Library of Congress Catalog Number)
  83. %%%     and price fields, and make ISBN, ISSN, LCCN, and price
  84. %%%     selectable by preprocessor conditionals.
  85. %%% 1.02 [12-Sep-1991]
  86. %%%      Merge in Barbara N. Beeton's suggestion for hyphen-less
  87. %%%      line breaks around volume(number):page.
  88. %%% 1.01 [10-Sep-1991]
  89. %%%      Update file comment header and use Solovay checksum program.
  90. %%% 1.00 [17-Oct-1990]
  91. %%%      Original version merging hand-edits of is-xxx.bst files into
  92. %%%      this master file, xbtxbst.doc.
  93.  
  94.  
  95. %% BibTeX `plain' family
  96. %%       version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
  97. %%       Copyright (C) 1985, all rights reserved.
  98. %%       Copying of this file is authorized only if either
  99. %%       (1) you make absolutely no changes to your copy, including name, or
  100. %%       (2) if you do make changes, you name it something other than
  101. %%       btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  102. %%       This restriction helps ensure that all standard styles are identical.
  103. %%       The file btxbst.doc has the documentation for this style.
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. ENTRY
  118.   { address
  119.     author
  120.     booktitle
  121.     chapter
  122.     edition
  123.     editor
  124.     howpublished
  125.     institution
  126.  
  127.     isbn
  128.  
  129.  
  130.     issn
  131.  
  132.     journal
  133.     key
  134.  
  135.     lccn
  136.  
  137.     month
  138.     note
  139.     number
  140.     organization
  141.     pages
  142.  
  143.     price
  144.  
  145.     publisher
  146.     school
  147.     series
  148.     title
  149.     type
  150.     volume
  151.     year
  152.   }
  153.   {}
  154.  
  155.   { label }
  156.  
  157.  
  158.  
  159. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  160.  
  161. FUNCTION {init.state.consts}
  162. { #0 'before.all :=
  163.   #1 'mid.sentence :=
  164.   #2 'after.sentence :=
  165.   #3 'after.block :=
  166. }
  167.  
  168.  
  169. STRINGS { s t }
  170.  
  171. FUNCTION {output.nonnull}
  172. { 's :=
  173.   output.state mid.sentence =
  174.     { ", " * write$ }
  175.     { output.state after.block =
  176.         { add.period$ write$
  177.           newline$
  178.           "\newblock " write$
  179.         }
  180.         { output.state before.all =
  181.             'write$
  182.             { add.period$ " " * write$ }
  183.           if$
  184.         }
  185.       if$
  186.       mid.sentence 'output.state :=
  187.     }
  188.   if$
  189.   s
  190. }
  191.  
  192. FUNCTION {output}
  193. { duplicate$ empty$
  194.     'pop$
  195.     'output.nonnull
  196.   if$
  197. }
  198.  
  199. FUNCTION {output.check}
  200. { 't :=
  201.   duplicate$ empty$
  202.     { pop$ "empty " t * " in " * cite$ * warning$ }
  203.     'output.nonnull
  204.   if$
  205. }
  206.  
  207. FUNCTION {output.bibitem}
  208. { newline$
  209.  
  210.   "\bibitem{" write$
  211.  
  212.   cite$ write$
  213.   "}" write$
  214.   newline$
  215.   ""
  216.   before.all 'output.state :=
  217. }
  218.  
  219.  
  220. FUNCTION {fin.entry}
  221. { add.period$
  222.   write$
  223.   newline$
  224. }
  225.  
  226. FUNCTION {new.block}
  227. { output.state before.all =
  228.     'skip$
  229.     { after.block 'output.state := }
  230.   if$
  231. }
  232.  
  233. FUNCTION {new.sentence}
  234. { output.state after.block =
  235.     'skip$
  236.     { output.state before.all =
  237.         'skip$
  238.         { after.sentence 'output.state := }
  239.       if$
  240.     }
  241.   if$
  242. }
  243.  
  244.  
  245. FUNCTION {not}
  246. {   { #0 }
  247.     { #1 }
  248.   if$
  249. }
  250.  
  251. FUNCTION {and}
  252. {   'skip$
  253.     { pop$ #0 }
  254.   if$
  255. }
  256.  
  257. FUNCTION {or}
  258. {   { pop$ #1 }
  259.     'skip$
  260.   if$
  261. }
  262.  
  263.  
  264. FUNCTION {new.block.checka}
  265. { empty$
  266.     'skip$
  267.     'new.block
  268.   if$
  269. }
  270.  
  271. FUNCTION {new.block.checkb}
  272. { empty$
  273.   swap$ empty$
  274.   and
  275.     'skip$
  276.     'new.block
  277.   if$
  278. }
  279.  
  280.  
  281. FUNCTION {new.sentence.checka}
  282. { empty$
  283.     'skip$
  284.     'new.sentence
  285.   if$
  286. }
  287.  
  288. FUNCTION {new.sentence.checkb}
  289. { empty$
  290.   swap$ empty$
  291.   and
  292.     'skip$
  293.     'new.sentence
  294.   if$
  295. }
  296.  
  297.  
  298. FUNCTION {field.or.null}
  299. { duplicate$ empty$
  300.     { pop$ "" }
  301.     'skip$
  302.   if$
  303. }
  304.  
  305. FUNCTION {emphasize}
  306. { duplicate$ empty$
  307.     { pop$ "" }
  308.     { "{\em " swap$ * "}" * }
  309.   if$
  310. }
  311.  
  312. INTEGERS { nameptr namesleft numnames }
  313.  
  314. FUNCTION {format.names}
  315. { 's :=
  316.   #1 'nameptr :=
  317.   s num.names$ 'numnames :=
  318.   numnames 'namesleft :=
  319.     { namesleft #0 > }
  320.  
  321.     { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
  322.  
  323.       nameptr #1 >
  324.         { namesleft #1 >
  325.             { ", " * t * }
  326.             { numnames #2 >
  327.                 { "," * }
  328.                 'skip$
  329.               if$
  330.               t "others" =
  331.                 { " et~al." * }
  332.                 { " and " * t * }
  333.               if$
  334.             }
  335.           if$
  336.         }
  337.         't
  338.       if$
  339.       nameptr #1 + 'nameptr :=
  340.       namesleft #1 - 'namesleft :=
  341.     }
  342.   while$
  343. }
  344.  
  345. FUNCTION {format.authors}
  346. { author empty$
  347.     { "" }
  348.     { author format.names }
  349.   if$
  350. }
  351.  
  352. FUNCTION {format.editors}
  353. { editor empty$
  354.     { "" }
  355.     { editor format.names
  356.       editor num.names$ #1 >
  357.         { ", editors" * }
  358.         { ", editor" * }
  359.       if$
  360.     }
  361.   if$
  362. }
  363.  
  364.  
  365. FUNCTION {format.isbn}
  366. { isbn empty$
  367.     { "" }
  368.     { new.block "ISBN " isbn * }
  369.   if$
  370. }
  371.  
  372.  
  373.  
  374. FUNCTION {format.issn}
  375. { issn empty$
  376.     { "" }
  377.     { new.block "ISSN " issn * }
  378.   if$
  379. }
  380.  
  381.  
  382.  
  383. FUNCTION {format.lccn}
  384. { lccn empty$
  385.     { "" }
  386.     { new.block "LCCN " lccn * }
  387.   if$
  388. }
  389.  
  390.  
  391.  
  392. FUNCTION {format.price}
  393. { price empty$
  394.     { "" }
  395.     { new.block " " price * }
  396.   if$
  397. }
  398.  
  399.  
  400.  
  401.  
  402.  
  403. FUNCTION {format.title}
  404. { title empty$
  405.     { "" }
  406.  
  407.     { title "t" change.case$ }
  408.  
  409.   if$
  410. }
  411.  
  412.  
  413.  
  414. FUNCTION {n.dashify}
  415. { 't :=
  416.   ""
  417.     { t empty$ not }
  418.     { t #1 #1 substring$ "-" =
  419.         { t #1 #2 substring$ "--" = not
  420.             { "--" *
  421.               t #2 global.max$ substring$ 't :=
  422.             }
  423.             {   { t #1 #1 substring$ "-" = }
  424.                 { "-" *
  425.                   t #2 global.max$ substring$ 't :=
  426.                 }
  427.               while$
  428.             }
  429.           if$
  430.         }
  431.         { t #1 #1 substring$ *
  432.           t #2 global.max$ substring$ 't :=
  433.         }
  434.       if$
  435.     }
  436.   while$
  437. }
  438.  
  439.  
  440. FUNCTION {format.date}
  441. { year empty$
  442.     { month empty$
  443.         { "" }
  444.         { "there's a month but no year in " cite$ * warning$
  445.           month
  446.         }
  447.       if$
  448.     }
  449.     { month empty$
  450.         'year
  451.         { month " " * year * }
  452.       if$
  453.     }
  454.   if$
  455. }
  456.  
  457.  
  458. FUNCTION {format.btitle}
  459. { title emphasize
  460. }
  461.  
  462.  
  463. FUNCTION {tie.or.space.connect}
  464. { duplicate$ text.length$ #3 <
  465.     { "~" }
  466.     { " " }
  467.   if$
  468.   swap$ * *
  469. }
  470.  
  471.  
  472. FUNCTION {either.or.check}
  473. { empty$
  474.     'pop$
  475.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  476.   if$
  477. }
  478.  
  479.  
  480. FUNCTION {format.bvolume}
  481. { volume empty$
  482.     { "" }
  483.     { "volume" volume tie.or.space.connect
  484.       series empty$
  485.         'skip$
  486.         { " of " * series emphasize * }
  487.       if$
  488.       "volume and number" number either.or.check
  489.     }
  490.   if$
  491. }
  492.  
  493.  
  494. FUNCTION {format.number.series}
  495. { volume empty$
  496.     { number empty$
  497.         { series field.or.null }
  498.         { output.state mid.sentence =
  499.             { "number" }
  500.             { "Number" }
  501.           if$
  502.           number tie.or.space.connect
  503.           series empty$
  504.             { "there's a number but no series in " cite$ * warning$ }
  505.             { " in " * series * }
  506.           if$
  507.         }
  508.       if$
  509.     }
  510.     { "" }
  511.   if$
  512. }
  513.  
  514.  
  515. FUNCTION {format.edition}
  516. { edition empty$
  517.     { "" }
  518.     { output.state mid.sentence =
  519.         { edition "l" change.case$ " edition" * }
  520.         { edition "t" change.case$ " edition" * }
  521.       if$
  522.     }
  523.   if$
  524. }
  525.  
  526.  
  527. INTEGERS { multiresult }
  528.  
  529. FUNCTION {multi.page.check}
  530. { 't :=
  531.   #0 'multiresult :=
  532.     { multiresult not
  533.       t empty$ not
  534.       and
  535.     }
  536.     { t #1 #1 substring$
  537.       duplicate$ "-" =
  538.       swap$ duplicate$ "," =
  539.       swap$ "+" =
  540.       or or
  541.         { #1 'multiresult := }
  542.         { t #2 global.max$ substring$ 't := }
  543.       if$
  544.     }
  545.   while$
  546.   multiresult
  547. }
  548.  
  549.  
  550. FUNCTION {format.book.pages}
  551. { pages empty$
  552.     { "" }
  553.     { new.block pages " pp." * }
  554.   if$
  555. }
  556.  
  557.  
  558.  
  559. FUNCTION {format.pages}
  560. { pages empty$
  561.     { "" }
  562.     { pages multi.page.check
  563.         { "pages" pages n.dashify tie.or.space.connect }
  564.         { "page" pages tie.or.space.connect }
  565.       if$
  566.     }
  567.   if$
  568. }
  569.  
  570.  
  571. FUNCTION {format.vol.num.pages}
  572. { volume field.or.null
  573.   number empty$
  574.     'skip$
  575.     { "\penalty0 (" number * ")" * *
  576.       volume empty$
  577.         { "there's a number but no volume in " cite$ * warning$ }
  578.         'skip$
  579.       if$
  580.     }
  581.   if$
  582.   pages empty$
  583.     'skip$
  584.     { duplicate$ empty$
  585.         { pop$ format.pages }
  586.         { ":\penalty0 " * pages n.dashify * }
  587.       if$
  588.     }
  589.   if$
  590. }
  591.  
  592.  
  593.  
  594. FUNCTION {format.chapter.pages}
  595. { chapter empty$
  596.     'format.pages
  597.     { type empty$
  598.         { "chapter" }
  599.         { type "l" change.case$ }
  600.       if$
  601.       chapter tie.or.space.connect
  602.       pages empty$
  603.         'skip$
  604.         { ", " * format.pages * }
  605.       if$
  606.     }
  607.   if$
  608. }
  609.  
  610.  
  611. FUNCTION {format.in.ed.booktitle}
  612. { booktitle empty$
  613.     { "" }
  614.     { editor empty$
  615.         { "In " booktitle emphasize * }
  616.         { "In " format.editors * ", " * booktitle emphasize * }
  617.       if$
  618.     }
  619.   if$
  620. }
  621.  
  622.  
  623. FUNCTION {empty.misc.check}
  624. { author empty$ title empty$ howpublished empty$
  625.   month empty$ year empty$ note empty$
  626.   and and and and and
  627.  
  628.  
  629.  
  630.     { "all relevant fields are empty in " cite$ * warning$ }
  631.     'skip$
  632.   if$
  633. }
  634.  
  635.  
  636. FUNCTION {format.thesis.type}
  637. { type empty$
  638.     'skip$
  639.     { pop$
  640.       type "t" change.case$
  641.     }
  642.   if$
  643. }
  644.  
  645.  
  646. FUNCTION {format.tr.number}
  647. { type empty$
  648.     { "Technical Report" }
  649.     'type
  650.   if$
  651.   number empty$
  652.     { "t" change.case$ }
  653.     { number tie.or.space.connect }
  654.   if$
  655. }
  656.  
  657.  
  658. FUNCTION {format.article.crossref}
  659. { key empty$
  660.     { journal empty$
  661.         { "need key or journal for " cite$ * " to crossref " * crossref *
  662.           warning$
  663.           ""
  664.         }
  665.         { "In {\em " journal * "\/}" * }
  666.       if$
  667.     }
  668.     { "In " key * }
  669.   if$
  670.   " \cite{" * crossref * "}" *
  671. }
  672.  
  673.  
  674. FUNCTION {format.crossref.editor}
  675. { editor #1 "{vv~}{ll}" format.name$
  676.   editor num.names$ duplicate$
  677.   #2 >
  678.     { pop$ " et~al." * }
  679.     { #2 <
  680.         'skip$
  681.         { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  682.             { " et~al." * }
  683.             { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  684.           if$
  685.         }
  686.       if$
  687.     }
  688.   if$
  689. }
  690.  
  691.  
  692. FUNCTION {format.book.crossref}
  693. { volume empty$
  694.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  695.       "In "
  696.     }
  697.     { "Volume" volume tie.or.space.connect
  698.       " of " *
  699.     }
  700.   if$
  701.   editor empty$
  702.   editor field.or.null author field.or.null =
  703.   or
  704.     { key empty$
  705.         { series empty$
  706.             { "need editor, key, or series for " cite$ * " to crossref " *
  707.               crossref * warning$
  708.               "" *
  709.             }
  710.             { "{\em " * series * "\/}" * }
  711.           if$
  712.         }
  713.         { key * }
  714.       if$
  715.     }
  716.     { format.crossref.editor * }
  717.   if$
  718.   " \cite{" * crossref * "}" *
  719. }
  720.  
  721.  
  722. FUNCTION {format.incoll.inproc.crossref}
  723. { editor empty$
  724.   editor field.or.null author field.or.null =
  725.   or
  726.     { key empty$
  727.         { booktitle empty$
  728.             { "need editor, key, or booktitle for " cite$ * " to crossref " *
  729.               crossref * warning$
  730.               ""
  731.             }
  732.             { "In {\em " booktitle * "\/}" * }
  733.           if$
  734.         }
  735.         { "In " key * }
  736.       if$
  737.     }
  738.     { "In " format.crossref.editor * }
  739.   if$
  740.   " \cite{" * crossref * "}" *
  741. }
  742.  
  743.  
  744. FUNCTION {article}
  745. { output.bibitem
  746.   format.authors "author" output.check
  747.   new.block
  748.   format.title "title" output.check
  749.   new.block
  750.   crossref missing$
  751.     { journal emphasize "journal" output.check
  752.       format.vol.num.pages output
  753.       format.date "year" output.check
  754.     }
  755.     { format.article.crossref output.nonnull
  756.       format.pages output
  757.     }
  758.   if$
  759.   new.block
  760.   note output
  761.   fin.entry
  762. }
  763.  
  764. FUNCTION {book}
  765. { output.bibitem
  766.   author empty$
  767.     { format.editors "author and editor" output.check }
  768.     { format.authors output.nonnull
  769.       crossref missing$
  770.         { "author and editor" editor either.or.check }
  771.         'skip$
  772.       if$
  773.     }
  774.   if$
  775.   new.block
  776.   format.btitle "title" output.check
  777.   crossref missing$
  778.     { format.bvolume output
  779.       new.block
  780.       format.number.series output
  781.       new.sentence
  782.       publisher "publisher" output.check
  783.       address output
  784.     }
  785.     { new.block
  786.       format.book.crossref output.nonnull
  787.     }
  788.   if$
  789.   format.edition output
  790.   format.date "year" output.check
  791.  
  792.   format.isbn output
  793.  
  794.  
  795.   format.book.pages output
  796.  
  797.  
  798.   format.lccn output
  799.  
  800.  
  801.   format.price output
  802.  
  803.   new.block
  804.   note output
  805.   fin.entry
  806. }
  807.  
  808.  
  809. FUNCTION {booklet}
  810. { output.bibitem
  811.   format.authors output
  812.   new.block
  813.   format.title "title" output.check
  814.   howpublished address new.block.checkb
  815.   howpublished output
  816.   address output
  817.   format.date output
  818.  
  819.   format.isbn output
  820.  
  821.  
  822.   format.book.pages output
  823.  
  824.  
  825.   format.lccn output
  826.  
  827.  
  828.   format.price output
  829.  
  830.   new.block
  831.   note output
  832.   fin.entry
  833. }
  834.  
  835.  
  836.  
  837. FUNCTION {inbook}
  838. { output.bibitem
  839.   author empty$
  840.     { format.editors "author and editor" output.check }
  841.     { format.authors output.nonnull
  842.       crossref missing$
  843.         { "author and editor" editor either.or.check }
  844.         'skip$
  845.       if$
  846.     }
  847.   if$
  848.   new.block
  849.   format.btitle "title" output.check
  850.   crossref missing$
  851.     { format.bvolume output
  852.       format.chapter.pages "chapter and pages" output.check
  853.       new.block
  854.       format.number.series output
  855.       new.sentence
  856.       publisher "publisher" output.check
  857.       address output
  858.     }
  859.     { format.chapter.pages "chapter and pages" output.check
  860.       new.block
  861.       format.book.crossref output.nonnull
  862.     }
  863.   if$
  864.   format.edition output
  865.   format.date "year" output.check
  866.  
  867.   format.isbn output
  868.  
  869.  
  870.   format.lccn output
  871.  
  872.  
  873.   format.price output
  874.  
  875.   new.block
  876.   note output
  877.   fin.entry
  878. }
  879.  
  880.  
  881. FUNCTION {incollection}
  882. { output.bibitem
  883.   format.authors "author" output.check
  884.   new.block
  885.   format.title "title" output.check
  886.   new.block
  887.   crossref missing$
  888.     { format.in.ed.booktitle "booktitle" output.check
  889.       format.bvolume output
  890.       format.number.series output
  891.       format.chapter.pages output
  892.       new.sentence
  893.       publisher "publisher" output.check
  894.       address output
  895.       format.edition output
  896.       format.date "year" output.check
  897.     }
  898.     { format.incoll.inproc.crossref output.nonnull
  899.       format.chapter.pages output
  900.     }
  901.   if$
  902.  
  903.   format.isbn output
  904.  
  905.  
  906.   format.lccn output
  907.  
  908.  
  909.   format.price output
  910.  
  911.   new.block
  912.   note output
  913.   fin.entry
  914. }
  915.  
  916.  
  917. FUNCTION {inproceedings}
  918. { output.bibitem
  919.   format.authors "author" output.check
  920.   new.block
  921.   format.title "title" output.check
  922.   new.block
  923.   crossref missing$
  924.     { format.in.ed.booktitle "booktitle" output.check
  925.       format.bvolume output
  926.       format.number.series output
  927.       format.pages output
  928.       address empty$
  929.         { organization publisher new.sentence.checkb
  930.           organization output
  931.           publisher output
  932.           format.date "year" output.check
  933.         }
  934.         { address output.nonnull
  935.           format.date "year" output.check
  936.           new.sentence
  937.           organization output
  938.           publisher output
  939.         }
  940.       if$
  941.     }
  942.     { format.incoll.inproc.crossref output.nonnull
  943.       format.pages output
  944.     }
  945.   if$
  946.  
  947.   format.isbn output
  948.  
  949.  
  950.   format.lccn output
  951.  
  952.  
  953.   format.price output
  954.  
  955.   new.block
  956.   note output
  957.   fin.entry
  958. }
  959.  
  960.  
  961. FUNCTION {conference} { inproceedings }
  962.  
  963.  
  964. FUNCTION {manual}
  965. { output.bibitem
  966.   author empty$
  967.     { organization empty$
  968.         'skip$
  969.         { organization output.nonnull
  970.           address output
  971.         }
  972.       if$
  973.     }
  974.     { format.authors output.nonnull }
  975.   if$
  976.   new.block
  977.   format.btitle "title" output.check
  978.   author empty$
  979.     { organization empty$
  980.         { address new.block.checka
  981.           address output
  982.         }
  983.         'skip$
  984.       if$
  985.     }
  986.     { organization address new.block.checkb
  987.       organization output
  988.       address output
  989.     }
  990.   if$
  991.   format.edition output
  992.   format.date output
  993.  
  994.   format.price output
  995.  
  996.   new.block
  997.   note output
  998.   fin.entry
  999. }
  1000.  
  1001.  
  1002. FUNCTION {mastersthesis}
  1003. { output.bibitem
  1004.   format.authors "author" output.check
  1005.   new.block
  1006.   format.title "title" output.check
  1007.   new.block
  1008.   "Master's thesis" format.thesis.type output.nonnull
  1009.   school "school" output.check
  1010.   address output
  1011.   format.date "year" output.check
  1012.   new.block
  1013.   note output
  1014.   fin.entry
  1015. }
  1016.  
  1017.  
  1018. FUNCTION {misc}
  1019. { output.bibitem
  1020.   format.authors output
  1021.   title howpublished new.block.checkb
  1022.   format.title output
  1023.   howpublished new.block.checka
  1024.   howpublished output
  1025.   format.date output
  1026.  
  1027.   format.issn output
  1028.  
  1029.  
  1030.   format.price output
  1031.  
  1032.   new.block
  1033.   note output
  1034.   fin.entry
  1035.   empty.misc.check
  1036. }
  1037.  
  1038.  
  1039. FUNCTION {phdthesis}
  1040. { output.bibitem
  1041.   format.authors "author" output.check
  1042.   new.block
  1043.   format.btitle "title" output.check
  1044.   new.block
  1045.   "PhD thesis" format.thesis.type output.nonnull
  1046.   school "school" output.check
  1047.   address output
  1048.   format.date "year" output.check
  1049.   new.block
  1050.   note output
  1051.   fin.entry
  1052. }
  1053.  
  1054.  
  1055. FUNCTION {periodical}
  1056. { output.bibitem
  1057.   editor empty$
  1058.     { organization output }
  1059.     { format.editors output.nonnull }
  1060.   if$
  1061.   new.block
  1062.   title emphasize "title" output.check
  1063.   format.vol.num.pages output
  1064.   format.date output
  1065.  
  1066.   format.issn output
  1067.  
  1068.  
  1069.   format.price output
  1070.  
  1071.   new.sentence
  1072.   publisher output
  1073.   address output
  1074.   howpublished new.block.checka
  1075.   howpublished output
  1076.   new.block
  1077.   note output
  1078.   fin.entry
  1079. }
  1080.  
  1081.  
  1082. FUNCTION {proceedings}
  1083. { output.bibitem
  1084.   editor empty$
  1085.     { organization output }
  1086.     { format.editors output.nonnull }
  1087.   if$
  1088.   new.block
  1089.   format.btitle "title" output.check
  1090.   format.bvolume output
  1091.   format.number.series output
  1092.   address empty$
  1093.     { editor empty$
  1094.         { publisher new.sentence.checka }
  1095.         { organization publisher new.sentence.checkb
  1096.           organization output
  1097.         }
  1098.       if$
  1099.       publisher output
  1100.       format.date "year" output.check
  1101.     }
  1102.     { address output.nonnull
  1103.       format.date "year" output.check
  1104.       new.sentence
  1105.       editor empty$
  1106.         'skip$
  1107.         { organization output }
  1108.       if$
  1109.       publisher output
  1110.     }
  1111.   if$
  1112.  
  1113.   format.isbn output
  1114.  
  1115.  
  1116.   format.lccn output
  1117.  
  1118.  
  1119.   format.price output
  1120.  
  1121.   new.block
  1122.   note output
  1123.   fin.entry
  1124. }
  1125.  
  1126.  
  1127. FUNCTION {techreport}
  1128. { output.bibitem
  1129.   format.authors "author" output.check
  1130.   new.block
  1131.   format.title "title" output.check
  1132.   new.block
  1133.   format.tr.number output.nonnull
  1134.   institution "institution" output.check
  1135.   address output
  1136.   format.date "year" output.check
  1137.  
  1138.   format.book.pages output
  1139.  
  1140.  
  1141.   format.price output
  1142.  
  1143.   new.block
  1144.   note output
  1145.   fin.entry
  1146. }
  1147.  
  1148.  
  1149. FUNCTION {unpublished}
  1150. { output.bibitem
  1151.   format.authors "author" output.check
  1152.   new.block
  1153.   format.title "title" output.check
  1154.   new.block
  1155.   note "note" output.check
  1156.   format.date output
  1157.   fin.entry
  1158. }
  1159.  
  1160.  
  1161. FUNCTION {default.type} { misc }
  1162.  
  1163.  
  1164.  
  1165.  
  1166. MACRO {jan} {"January"}
  1167.  
  1168. MACRO {feb} {"February"}
  1169.  
  1170. MACRO {mar} {"March"}
  1171.  
  1172. MACRO {apr} {"April"}
  1173.  
  1174. MACRO {may} {"May"}
  1175.  
  1176. MACRO {jun} {"June"}
  1177.  
  1178. MACRO {jul} {"July"}
  1179.  
  1180. MACRO {aug} {"August"}
  1181.  
  1182. MACRO {sep} {"September"}
  1183.  
  1184. MACRO {oct} {"October"}
  1185.  
  1186. MACRO {nov} {"November"}
  1187.  
  1188. MACRO {dec} {"December"}
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195. MACRO {acmcs} {"ACM Computing Surveys"}
  1196.  
  1197. MACRO {acta} {"Acta Informatica"}
  1198.  
  1199. MACRO {cacm} {"Communications of the ACM"}
  1200.  
  1201. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  1202.  
  1203. MACRO {ibmsj} {"IBM Systems Journal"}
  1204.  
  1205. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  1206.  
  1207. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  1208.  
  1209. MACRO {ieeetcad}
  1210.  {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  1211.  
  1212. MACRO {ipl} {"Information Processing Letters"}
  1213.  
  1214. MACRO {jacm} {"Journal of the ACM"}
  1215.  
  1216. MACRO {jcss} {"Journal of Computer and System Sciences"}
  1217.  
  1218. MACRO {scp} {"Science of Computer Programming"}
  1219.  
  1220. MACRO {sicomp} {"SIAM Journal on Computing"}
  1221.  
  1222. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  1223.  
  1224. MACRO {tods} {"ACM Transactions on Database Systems"}
  1225.  
  1226. MACRO {tog} {"ACM Transactions on Graphics"}
  1227.  
  1228. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  1229.  
  1230. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  1231.  
  1232. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  1233.  
  1234. MACRO {tcs} {"Theoretical Computer Science"}
  1235.  
  1236.  
  1237.  
  1238.  
  1239. READ
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256. STRINGS { longest.label }
  1257.  
  1258. INTEGERS { number.label longest.label.width }
  1259.  
  1260. FUNCTION {initialize.longest.label}
  1261. { "" 'longest.label :=
  1262.   #1 'number.label :=
  1263.   #0 'longest.label.width :=
  1264. }
  1265.  
  1266. FUNCTION {longest.label.pass}
  1267. { number.label int.to.str$ 'label :=
  1268.   number.label #1 + 'number.label :=
  1269.   label width$ longest.label.width >
  1270.     { label 'longest.label :=
  1271.       label width$ 'longest.label.width :=
  1272.     }
  1273.     'skip$
  1274.   if$
  1275. }
  1276.  
  1277. EXECUTE {initialize.longest.label}
  1278.  
  1279. ITERATE {longest.label.pass}
  1280.  
  1281.  
  1282.  
  1283.  
  1284. FUNCTION {begin.bib}
  1285.  
  1286. { preamble$ empty$
  1287.  
  1288.     'skip$
  1289.     { preamble$ write$ newline$ }
  1290.   if$
  1291.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1292. }
  1293.  
  1294. EXECUTE {begin.bib}
  1295.  
  1296. EXECUTE {init.state.consts}
  1297.  
  1298.  
  1299. ITERATE {call.type$}
  1300.  
  1301.  
  1302. FUNCTION {end.bib}
  1303. { newline$
  1304.   "\end{thebibliography}" write$ newline$
  1305. }
  1306.  
  1307. EXECUTE {end.bib}
  1308.